<template>
  <div class="liteflow-shape-wrapper">
    <img class="liteflow-shape-svg" :src="icon" />
    <slot></slot>
  </div>
</template>

<script>
import { defineComponent } from 'vue';

export default defineComponent({
  name: 'NodeView',
  props: {
    icon: {
      type: String,
      required: true,
    },
    node: {
      // X6 Node实例不是普通Object,移除类型验证
      required: true,
    },
  },
});
</script>

<style lang="less" scoped>
.liteflow-shape-wrapper {
  position: relative;
  font-size: 12px;
  cursor: pointer;
  pointer-events: auto;
  width: 100%;
  height: 100%;
}

.liteflow-shape-svg {
  width: 100%;
  height: 100%;
  overflow: visible !important;
}
</style>
